<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Home\Model;

use Think\Model\ViewModel;

class BlogViewModel extends ViewModel {

    public $viewFields = array(
        'Blog' => array('blog_id', 'title', 'content'),
        'Category' => array('category_name' => 'category', '_on' => 'Blog.category_id=Category.category_id'),
        'User' => array('username' => 'name', '_on' => 'Blog.user_id=User.user_id'),
    );

}
